<template>
	<view class="uni-container">
		<view class="uni-panel" v-for="(item, index) in list" :key="item.id">
			<view class="uni-panel-h" @click="goto( item)">
				<text class="uni-panel-text">{{item.name}}</text>
				<text class="uni-panel-icon uni-icon">{{item.pages ? '&#xe581;' : '&#xe470;'}}</text>
			</view>
		</view>
		<button @click="abc">测试打开日志</button>
		<drag-button ref="dragbtn" :isDock="true" :existTabBar="true" :open="false" :toppading="true" />
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
						name: '登录',
						url: '/pages/login/index'
					},
					{
						name: '即时通讯',
						url: '/pages/im/index'
					},
					{
						name: '直播',
						url: '/pages/live/livelogin'
					},
					{
						name: '视频播放器',
						url: '/pages/player/index'
					},
					{
						name: '投屏',
						url: '/pages/toupin/index'
					},
					{
						name: '签名',
						url: '/pages/qianming/index'
					},
					{
						name: '相机',
						url: '/pages/xiangji/index'
					},
					{
						name: '语音视频',
						url: '/pages/shipin/index'
					},
					{
						name: '人脸核身',
						url: '/pages/heshen/face'
					},
					{
						name: '测试',
						url: '/pages/test/test'
					}
				]
			}
		},
		onLoad() {

		},
		methods: {
			goto(item) {
				uni.navigateTo({
					url: item.url
				})
			},
			abc() {
				this.$refs.dragbtn.open = true;
			},
		}
	}
</script>

<style>
	@import '@/uni-nvue.css';
</style>
